package cn.ytr.crm.domain;

import com.alibaba.fastjson.JSON;
import lombok.*;

import java.util.HashMap;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class Department extends BaseDomain {

    //部门id
    private Long id;

    //部门名称
    private String name;

    //部门编号
    private String sn;

    //用来返回 json 数据的
    public String getJsonString() {
        HashMap<String, Object> map = new HashMap<>();
        map.put("id", id);
        map.put("name", name);
        map.put("sn", sn);
        return JSON.toJSONString(map);
    }

}